﻿#ifndef ATTENDENCEWIN_H
#define ATTENDENCEWIN_H

#include <QMainWindow>
#include <QTcpSocket>
#include <QTcpServer>
#include <QFaceObject.h>
#include <QSqlTableModel>
#include <QSqlRecord>
QT_BEGIN_NAMESPACE
namespace Ui {
class AttendenceWin;
}
QT_END_NAMESPACE

class AttendenceWin : public QMainWindow
{
    Q_OBJECT

public:
    AttendenceWin(QWidget *parent = nullptr);
    ~AttendenceWin();
signals:
    void query(cv::Mat &image);
protected slots:
    void accept_client();
    void read_data();
    void recv_faceid(int faceid,float similarity);
private:
    Ui::AttendenceWin *ui;
    QTcpServer* m_tcpServer=nullptr;
    QTcpSocket* m_tcpSocket=nullptr;
    quint64 bsize=0;
    QFaceObject fobj;
    QSqlTableModel model;
};
#endif // ATTENDENCEWIN_H
